package com.fzhucc.modules.lesson.service;

import com.fzhucc.modules.lesson.domain.LessonLearnRecord;
import com.fzhucc.modules.lesson.domain.dto.LessonLearnRecordAddDto;
import com.fzhucc.modules.lesson.domain.dto.LessonLearnRecordDto;
import com.fzhucc.modules.lesson.domain.dto.LessonLearnRecordQueryCriteria;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* @description 服务接口
* @author yyg
* @date 2022-12-08
**/
public interface LessonLearnRecordService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(LessonLearnRecordQueryCriteria criteria, Pageable pageable);

    /**
     * 查询数据分页
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Map<String,Object> my(LessonLearnRecordQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<LessonLearnRecordDto>
    */
    List<LessonLearnRecordDto> queryAll(LessonLearnRecordQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return LessonLearnRecordDto
     */
    LessonLearnRecordDto findById(Integer id);

    /**
    * 创建
    * @param resources /
    * @return LessonLearnRecordDto
    */
    LessonLearnRecordDto create(LessonLearnRecordAddDto resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(LessonLearnRecord resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Integer[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<LessonLearnRecordDto> all, HttpServletResponse response) throws IOException;
    /**
     * 我课程的学习情况
     * @param  /
     * @return
     */
    List<LessonLearnRecordDto> getLessonLearnRecordByMe();
}